package com.stupidzhe.vbreview.dao;

import com.stupidzhe.vbreview.domain.UploadProject;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UploadProjectMapper {

    int insert(UploadProject uploadProject);

    List<UploadProject> selectByStudentIdandProjectId(@Param("studentId") Integer studentId, @Param("projectId") Integer projectId);

    List<UploadProject> getPageContent(@Param("start") int start, @Param("size") int size,
                                       @Param("keyword") String keyword, @Param("teacherId") Integer teacherId,
                                       @Param("studentId") Integer studentId);

    int getCount(@Param("keyword") String keyword, @Param("teacherId") Integer teacherId, @Param("studentId") Integer studentId);

    UploadProject selectByPrimaryKey(Integer uploadId);

    int update(UploadProject uploadProject);
}
